package org.example.test1;

public class Emoloyee {
    //类的成员:属性,就是变量
    String name;
    int age;
    double salary;
    //TODO 如果类里==没有==写构造方法,系统会默认分配一个无参的构造方法
    public Emoloyee(){

    }
    public Emoloyee(String name, int age, double salary) {
        this.name = name;
        this.age = age;
        this.salary = salary;
    }
public int anInt(){
        return age;
}
    //类的成员:方法
    public void showInfo(){
        System.out.println("姓名:"+this.name+" 年龄:"+this.age+" 工资:"+this
                .salary);
    }
    public void speed(){
        System.out.println("该发工资了!");
    }
}
